package com.alinesno.infra.smart.scene.service;

import com.alinesno.infra.common.facade.datascope.PermissionQuery;
import com.alinesno.infra.common.facade.services.IBaseService;
import com.alinesno.infra.smart.scene.dto.ProjectKnowledgeGroupDto;
import com.alinesno.infra.smart.scene.entity.ProjectKnowledgeGroupEntity;

import java.util.List;

public interface IProjectKnowledgeGroupService extends IBaseService<ProjectKnowledgeGroupEntity> {

    /**
     * 查询当前所有规则组及当前规则组下的所有规则列表
     *
     * @param query
     * @return
     */
    List<ProjectKnowledgeGroupDto> listGroup(PermissionQuery query);

    /**
     * 删除分组之后，当中关联的规则也会被删除掉
     * @param id
     */
    void removeGroup(Long id);

    /**
     * 根据索引名称查询
     * @param outsideCollectionIndexName
     * @return
     */
    ProjectKnowledgeGroupEntity getByCollectionIndexName(String outsideCollectionIndexName);
}